package com.superatom.designpattern.singleton.lazysingleton;

/**
 * 单例模式-懒汉模式-同步方法
 */
public class LazySyncSingleton {
    private static LazySyncSingleton instance = null;

    private LazySyncSingleton(){

    }

    public static synchronized LazySyncSingleton getInstance(){
        if (instance == null) {
            instance = new LazySyncSingleton();
        }
        return instance;
    }
}
